package com.fy.admin.api;


import com.fy.admin.dto.EnterpriseDto;
import com.fy.admin.dto.PersonalDto;
import com.fy.admin.dto.SupplierDto;
import com.fy.common.api.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/merchant")
@Api(tags = "商户管理")
@RefreshScope
public class MerchantManagementController {

    //企业审核------------------------------------------
    @ApiOperation("企业查询所有")
    @GetMapping(value = "/enterprise/findAll/{pageSize}/{limit}")
    public CommonResult enterpriseFindAll(@PathVariable Integer pageSize, @PathVariable Integer limit) {
        List<EnterpriseDto> list = null;
        return CommonResult.success(list);
    }


    @ApiOperation("企业根据ID查询")
    @GetMapping(value = "/enterprise/findById/{id}")
    public CommonResult enterpriseFindById(@PathVariable Integer id) {
        List<EnterpriseDto> list = null;
        return CommonResult.success(list);
    }


    @ApiOperation("企业审核")
    @PostMapping(value = "/enterprise/updateState/{enterpriseId}/{operatorId}/{enable}")
    public CommonResult enterpriseUpdateState(@PathVariable Integer id) {
        return CommonResult.success();
    }

    //个人审核
    //个人审核---------------------------------------
    @GetMapping(value = "/personal/findAll/{pageSize}/{limit}")
    public CommonResult personalFindAll(@PathVariable Integer pageSize, @PathVariable Integer limit) {
        List<PersonalDto> list = null;
        return CommonResult.success(list);
    }

    @ApiOperation("根据个人ID查询")
    @GetMapping(value = "/personal/findById/{id}")
    public CommonResult personalFindById(@PathVariable Integer id) {
        return CommonResult.success(new PersonalDto());
    }

    @ApiOperation("个人审核")
    @PostMapping(value = "/personal/updateState/{personalId}/{operatorId}/{enable}")
    public CommonResult personalUpdateState(@PathVariable Integer id) {
        return CommonResult.success();
    }


    //景区商户--------------------------------------------------
    @ApiOperation("景区商户查询所有")
    @GetMapping(value = "/scenic/findAll/{pageSize}/{limit}")
    public CommonResult scenicFindAll(@PathVariable Integer pageSize, @PathVariable Integer limit) {
        List<SupplierDto> list = null;
        return CommonResult.success(list);
    }

    @ApiOperation("根据景区商户ID查询")
    @GetMapping(value = "/scenic/findById/{id}")
    public CommonResult scenicFindById(@PathVariable Integer id) {
        return CommonResult.success(new SupplierDto());
    }

    @ApiOperation("景区商户审核")
    @PostMapping(value = "/scenic/updateState/{scenicId}/{operatorId}/{enable}")
    public CommonResult scenicUpdateState(@PathVariable Integer id) {
        return CommonResult.success();
    }


    //景区商品--------------------------------------------------
    @ApiOperation("景区商品查询所有")
    @GetMapping(value = "/product/findAll")
    public CommonResult productFindAll() {
        List<SupplierDto> list = null;
        return CommonResult.success(list);
    }

    @ApiOperation("根据景区商品ID查询")
    @GetMapping(value = "/product/findById/{id}")
    public CommonResult productFindById(@PathVariable Integer id) {
        return CommonResult.success(new SupplierDto());
    }

    @ApiOperation("景区商品审核")
    @PostMapping(value = "/product/updateState/{productId}/{operatorId}/{enable}")
    public CommonResult productUpdateState(@PathVariable Integer id) {
        return CommonResult.success();
    }
}

